//
//  NetWorkTools.swift
//  DSWeibo
//
//  Created by liuzhu on 2018/11/13.
//  Copyright © 2018 liuzhu. All rights reserved.
//

import UIKit
import AFNetworking

class NetWorkTools: AFHTTPSessionManager {
    
    static let tools:NetWorkTools = {
        let url = URL(string: "https://api.weibo.com/")
        let t = NetWorkTools(baseURL: url)
        
        t.responseSerializer.acceptableContentTypes = Set(arrayLiteral: "application/json","text/json","text/javascript","text/plain")
        return t
    }()
    
    //获取单例
    class func shareNetworkTools()->NetWorkTools{
        return tools
    }
    
    
}
